<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>JpetStore</title>
    <link rel="stylesheet" href="../css/jpetstore.css" type="text/css"/>
    <link rel="stylesheet" href="../css/jquery-ui.css" type="text/css"/>
    <script th:src = "@{/JS/jquery-3.2.1.js}"></script>
    <script th:src = "@{/JS/jquery-ui.js}"></script>
</head>
<body>
    <div th:replace="/common/header.html"></div>
    <div id="Content">
        <div id="Catalog">
            <div>
                <a href="/catalog/main">Return to Menu</a>
            </div>
            <form action="/account/newAccount" method="post" id="newAccountForm">
                <h3>User Information</h3>

                <table>
                    <tr>
                        <td>User ID:</td>
                        <td><input type="text" name="username" id="username" class="newAccountFormText" required="required"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td id="isExistInfo"></td>
                    </tr>
                    <tr>
                        <td>New password:</td>
                        <td><input type="password" name="password" id="password" class="newAccountFormText"  maxlength="16" required="required"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td id="isRightPass"></td>
                    </tr>
                    <tr>
                        <td>Repeat password:</td>
                        <td><input type="password" name="repeatPassword" id="repeatPassword" class="newAccountFormText" maxlength="16" required="required"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td id="isRepeatPass"></td>
                    </tr>
                </table>

                <!--不用更上middle只有一个默认找这个文件里面的middle-->
                    <div th:replace="/account/IncludeAccountFields::newaccountmiddle"></div>

                <label for="textCode" id="newAccountFormTextCode">验证码:  </label><input type="text" name="textCode" class="newAccountFormText" id="textCode" required="required">
                <br/>
                <span id="isRightTextCode"></span><br/>
                <script type="text/javascript">
                    function reImg(){
                        var img = document.getElementById("Img");
                        img.src = "paint?rnd=" + Math.random();
                    }
                </script>
                <a href="#" onclick="reImg()">
                <span  class="cell-5" style="text-align: center;">
                            <img id="Img" src="paint">
                        </span>
                </a>

                </br>
                <script th:src = "@{/JS/account/NewAccountForm.js}"></script>
                <input type="submit" value="提交"/>
            </form>
        </div>
    </div>
    <div th:replace="/common/footer.html"></div>
</body>
</html>